<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>
<script>
    var a=false
    var b=true
    var obj={
        sum:{
            num:22
        },
        res:null
    }
    if(obj.res.age){
        console.log(111);
    }else if(b){
        console.log(222);
    }else{
        console.log(333);
    }
</script>
</html>